package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// SupervisorOrdersEntityToDto entity data transfer
func SupervisorOrdersEntityToDto(supervisorOrders []*entity.SupervisorOrder) []*model.SupervisorOrderInfo {
	out := make([]*model.SupervisorOrderInfo, 0, len(supervisorOrders))
	for _, c := range supervisorOrders {
		out = append(out, SupervisorOrderEntityToDto(c))
	}
	return out
}

// SupervisorOrderEntityToDto entity data transfer
func SupervisorOrderEntityToDto(e *entity.SupervisorOrder) *model.SupervisorOrderInfo {
	return &model.SupervisorOrderInfo{

		Id: e.Id,

		ConsultId: e.ConsultId,

		Price: e.Price,

		DeductCount: e.DeductCount,

		DeductReason: e.DeductReason,

		SupervisorId: e.SupervisorId,

		Status: e.Status,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
